<head>
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="jquery.md5.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
	  var qaaUid = localStorage["qaaUid"];
    var qaaPwd = localStorage["qaaPwd"];
	
	  var qamUid = localStorage["qamUid"];
    var qamPwd = localStorage["qamPwd"];
	
		var cqaaUid = localStorage["cqaaUid"];
    var cqaaPwd = localStorage["cqaaPwd"];
	
		var cqamUid = localStorage["cqamUid"];
    var cqamPwd = localStorage["cqamPwd"];
	
		var taUid = localStorage["taUid"];
    var taPwd = localStorage["taPwd"];
	
		var tmUid = localStorage["tmUid"];
    var tmPwd = localStorage["tmPwd"];

  var requestString ="";

  //fill input
  $("#ta").click(function()
  {
    $("#uid").val(taUid);
    $("#pwd").val(taPwd);

  });
  $("#tm").click(function()
  {
    $("#uid").val(tmUid);
    $("#pwd").val(tmPwd);

  });
  $("#qaa").click(function()
  {
    $("#uid").val(qaaUid);
    $("#pwd").val(qaaPwd);

  });
  $("#qam").click(function()
  {
    $("#uid").val(qamUid);
    $("#pwd").val(qamPwd);

  });
    $("#cqaa").click(function()
  {
    $("#uid").val(cqaaUid);
    $("#pwd").val(cqaaPwd);

  });
    $("#cqam").click(function()
  {
    $("#uid").val(cqamUid);
    $("#pwd").val(cqamPwd);

  });
 

  //submit
  $("#submit").click(function()
  {
    requestString ="&userid="+$("#uid").val()+"&password="+$.md5($("#pwd").val());
    var eid = $("input:checked").attr("id");
    
      chrome.tabs.create(
      {
        'url': document.getElementById(eid).value+requestString,
        'selected': true
      })
  });
  
});

</script>
</head>
<body>
<form>
<table width="230px" border="1">
<tr nowrap="nowrap">
<td width="55px"><input id="ta" type="radio" name="site" value="https://training.tradecard.com/en/administration/login.jsp?reqID=11282006&nav=Homenav"/>
Ta</td>
<td width="85px"><input id="qaa" type="radio" name="site" value="http://commerce.qa.tradecard.com/en/administration/login.jsp?reqID=11282006&nav=Homenav" />
QA A</td>
<td width="90px"><input id="cqaa" type="radio" name="site" value="https://cqa.tradecard.com/en/administration/login.jsp?reqID=11282006&nav=Homenav" />
CQA A</td>
</tr>
<tr>
<td width="55px"><input id="tm" type="radio" name="site" value="https://training.tradecard.com/en/trade/login.jsp?reqID=11282006&nav=Homenav" />
Tm</td>
<td width="85px"><input id="qam" type="radio" name="site" value="http://commerce.qa.tradecard.com/en/trade/login.jsp?reqID=11282006&nav=Homenav" />
QA m</td>
<td width="90px"><input id="cqam" type="radio" name="site" value="https://cqa.tradecard.com/en/trade/login.jsp?reqID=11282006&nav=Homenav" />
CQA m</td>
</tr>
</table>
<br/>
<table width="100%" border="0">
<tr>
<td width="3%">id</td>
<td><input type="text" id="uid" value="czhu"/></td>
</tr>
<tr>
<td>pwd</td>
<td><input type="password" id="pwd"/></td>
</tr>
</table>
<input id="submit" type="button" value="login">
</form>
</body>
</html>